package Scuttlebutt;

import java.awt.event.*;
import javax.swing.*;

public class UndoMenuItem extends JMenuItem implements ActionListener 
{
	EditPane pane = null;
	public UndoMenuItem(EditPane pane)
	{
		super("Undo");
		this.pane = pane;
		addActionListener(this);
	}


	public void actionPerformed(ActionEvent a0)
	{
		Tab t = (Tab)((JScrollPane)pane.getSelectedComponent()).getViewport().getView();
		if(t != null)
			t.undo();
	}
}

